﻿<%@ Page Title="" EnableEventValidation="false" Language="C#" MasterPageFile="~/Admin/AdminPosy.Master" AutoEventWireup="true" CodeBehind="Images.aspx.cs" Inherits="PeonyShop.Admin.Images" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="Js/jquery.uploadify.v2.1.4.min.js" type="text/javascript"></script>
    <script src="Js/swfobject.js" type="text/javascript"></script>    
    <script src="Js/JSImages.js" type="text/javascript"></script>
    <script src="../JS/JQuery/JSon2.js" type="text/javascript"></script>
    
    <script src="Js/highslide.js" type="text/javascript"></script>
    <script src="Js/JQuery/swfobject.js" type="text/javascript"></script>


    <link href="Js/highslide.css" rel="stylesheet" type="text/css" />
    <link href="Css/JQuery/uploadify.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
    <div id="center-column">
			<div class="top-bar">
				<a href="javascript:void(0)" class="button" id="btnAddNew">ADD NEW </a>
                <a href="javascript:void(0)" class="button" id="btnEdit">EDIT</a>
				<h1>Images Management</h1>
				<%--<div class="breadcrumbs"><a href="#">Homepage</a> / <a href="#">Contents</a></div>--%>
			</div><br />
          <div class="select-bar" id="divBarSearch">
            <label>
            Product name
		   <asp:TextBox ID="txtNameSerch" runat="server"></asp:TextBox>
		    </label>
            <asp:DropDownList ID="ddlCate" runat="server">
            </asp:DropDownList>
           
            <asp:DropDownList ID="subCate" runat="server">
            </asp:DropDownList>

         <%--   <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem Text="ss" Value="0"></asp:ListItem>
            <asp:ListItem Text="ssssss" Value="1"></asp:ListItem>
            <asp:ListItem Text="sss" Value="2"></asp:ListItem>
            </asp:DropDownList>
--%>
            <asp:Button ID="btnSubmitCate" runat="server" Text="Search" OnClick="btnSubmitCate_Click" />
          </div>
			<div class="table" id="divListItem">

				<%--<img src="Images/bg-th-left.gif" width="8" height="7" alt="" class="left" />
				<img src="Images/bg-th-right.gif" width="7" height="7" alt="" class="right" />--%>

                <asp:GridView ID="grvImg" CssClass="listing" runat="server" AllowPaging="true" 
                    AllowSorting="true" AutoGenerateColumns="false" PageSize="15" 
                    onrowdatabound="grvImg_RowDataBound" 
                    onpageindexchanging="grvImg_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="Images">
                            <ItemTemplate>
                                <asp:HyperLink CssClass="highslide" onclick="return hs.expand(this)" ID="linkImg" runat="server">
                                    <asp:Image ID="imgItem" runat="server" Height="100"></asp:Image>
                                </asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Name">
                            <ItemTemplate>
                                <asp:TextBox Width="100%" ID="txtName" runat="server" TextMode="MultiLine" Rows="7" ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:TextBox Width="100%" ID="txtDesc" runat="server" TextMode="MultiLine" Rows="7"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Show <br/> Home" >
                        <ItemTemplate>
                            <asp:CheckBox ID="ckShowHome" runat="server"/>
                        </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Show <br/> Own" >
                         <ItemTemplate>
                            <asp:CheckBox ID="ckShowOwn" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Active" >
                         <ItemTemplate>
                            <asp:CheckBox ID="ckActive" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Del" >
                         <ItemTemplate>
                            <asp:CheckBox ID="ckDelete" runat="server" />
                        </ItemTemplate>
                        </asp:TemplateField>

                         <asp:TemplateField HeaderText="Order" >
                         <ItemTemplate>
                            <asp:TextBox Width="25px" ID="txtOrder" runat="server"></asp:TextBox>
                        </ItemTemplate>
                        </asp:TemplateField>

                    </Columns>
                </asp:GridView>
				
                <div style="text-align:center;padding-top:20px">                    
                    <input type="button" id="btnUpdateImg" value="Update" style="display:none" />
                </div>

				<div class="select" style="display:none">
					<strong>Other Pages: </strong>
					<select>
						<option>1</option>
					</select>
			  </div>

              <script id="ImagesTemplate" type="text/x-jquery-tmpl"> 
                 <tr>
						<td class="first style1">- Lorem Ipsum </td>
						<td><img src="Images/add-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/hr.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/save-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/edit-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/login-icon.gif" width="16" height="16" alt="" /></td>
						<td><img src="Images/save-icon.gif" width="16" height="16" alt="save" /></td>
						<td class="last"><img src="Images/add-icon.gif" width="16" height="16" alt="add" /></td>
					</tr>
            </script>
			</div>		
            
            <!-- For Add New -->
            <div class="table" style="display:none" id="divAddNew" >
            
                <table class="tabAdd"  cellpadding="0" cellspacing="0" width="560px">
                    <tr>
                        <td class="title">Name</td>
                        <td class="content"><asp:TextBox ID="txtName" runat="server" CssClass="textAdd"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="title">Description</td>
                        <td class="content"><asp:TextBox ID="txtDesc" TextMode="MultiLine" runat="server" Rows="3" Columns="60"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="title">Category</td>
                        <td class="content"><asp:DropDownList ID="ddlCategory" runat="server">
                                
                        </asp:DropDownList> </td>
                    </tr>
                    <tr id="tdSubcate">
                        <td class="title">Sub category</td>
                        <td class="content">
                            <asp:DropDownList ID="ddlSubcate" runat="server">
                                
                            </asp:DropDownList>
                        </td>
                    </tr>
                    
                    <tr id="tdProduct">
                        <td class="title">Product</td>
                        <td class="content">
                            <asp:DropDownList ID="ddProduct" runat="server">
                                
                            </asp:DropDownList>
                        </td>
                    </tr>

                     <tr>
                        <td class="title">Color</td>
                        <td class="content"><asp:TextBox ID="txtColor" runat="server"></asp:TextBox> </td>
                    </tr>
                     <tr>
                        <td class="title">Origin</td>
                        <td class="content"><asp:TextBox ID="txtOrigin" runat="server"></asp:TextBox></td>
                    </tr>
                     <tr>
                        <td class="title">Unit price</td>
                        <td class="content"><asp:TextBox ID="txtPrice" runat="server"></asp:TextBox></td>
                    </tr>                    
                    <tr>
                        <td class="title">Show Home Page</td>
                        <td class="content"><asp:CheckBox ID="ckbIsShowHomePage" runat="server" /></td>
                    </tr>
                    <tr>
                        <td class="title">Show Own Page</td>
                        <td class="content"><asp:CheckBox ID="ckbShowOwnPage" runat="server"  Checked="true"/></td>
                    </tr>
                     <tr>
                        <td class="title">Active</td>
                        <td class="content"><asp:CheckBox ID="ckbActive" runat="server" Checked="true" /></td>
                    </tr> 
                    <tr id="trAddNew">
                        <td class="title">Delete</td>
                        <td class="content"><asp:CheckBox ID="ckbDelete" runat="server" Checked="false" /></td>
                    </tr>
                    <tr>   
                    <td class="title">images </td> 
                        <td>
                             <input id="file_upload" name="file_upload" type="file" />
                        </td>
                    </tr>
                    <tr>
                       <td colspan="2">
                            <input type="button" id="btnSaveImage" value="Save" />
                       </td> 
                    </tr>
                </table>
                <asp:Label ID="spResult" runat="server"></asp:Label>
            </div>
            <!-- End Add New --> 
		</div>

        <asp:Literal ID="litJavas" runat="server">
        </asp:Literal>

<script type="text/javascript">
    hs.graphicsDir = 'Js/highslide/graphics/';
    hs.outlineType = null;
    hs.wrapperClassName = 'colored-border';
</script>

        <script type="text/javascript">
            $(document).ready(function () {


//              $(popup).css("width", "350px");
//                $("table[id$='grvImg'] img").tooltip({
//                    delay: 0,
//                    opacity: 1,
//                    showURL: false,
//                    bodyHandler: function () {
//                        return $("<img/>").attr("src", this.src);
//                    }
//                });

            });
        </script>
        <style type="text/css">
            #tooltip {
	            position: absolute;
	            z-index: 3000;
	            border: 1px solid #111;
	            background-color: #eee;
	            padding: 5px;
	            opacity: 0.85;
            }
            #tooltip h3, #tooltip div { margin: 0; }
        </style>
</asp:Content>

